#ifndef __WIZ_UTILS_STATE_MACHINE_STATE_HPP__SHANHAOBO_19800429__
#define __WIZ_UTILS_STATE_MACHINE_STATE_HPP__SHANHAOBO_19800429__

#include "../../Base/Type/WizBaseTypeBase.hpp"

namespace Wiz
{
    namespace StateMachine
    {
        //////////////////////////////////////////////////////////////////////////
        namespace State
        {
            template <class StateMachineT, class BaseT = ::Wiz::Null::Type>
            class Type : BaseT
            {
                WIZ_DECLARE_CLASS_THIS(Type);
            protected:
                typedef StateMachineT                               tStateMachine;
                typedef tStateMachine&                              tStateMachineRef;

                typedef typename tStateMachine::tName               tName;
                typedef typename tStateMachine::tNameRef            tNameRef;
                typedef typename tStateMachine::tNameRefConst       tNameRefConst;
                typedef typename tStateMachine::tNameIn             tNameIn;

                friend typename tStateMachine;

            protected:
                Type(tStateMachineRef InSM, tNameIn InName) : m_StateMachine(InSM), m_Name(InName)
                {
                }
                virtual ~Type()
                {
                }
            public:
                tNameRefConst GetName() const
                {
                    return this->m_Name;
                }
                tStateMachineRef GetStateMachine() const
                {
                    return this->m_StateMachine;
                }
            public:
                virtual ::Wiz::Void::Type Enter() = 0;
                virtual ::Wiz::Void::Type Exit() = 0;
            private:
                const tName                 m_Name;
                tStateMachineRef            m_StateMachine;
            };
        } /// end of namespace State
    } /// end of namespace StateMachine
} /// end of namespace Wiz

#endif /*__WIZ_UTILS_STATE_MACHINE_STATE_HPP__SHANHAOBO_19800429__*/
